package top.mcwebsite.playandroid.business.tixi.impl.api

import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query
import top.mcwebsite.playandroid.business.articles.api.model.ArticleModel
import top.mcwebsite.playandroid.business.tixi.impl.model.TixiModel
import top.mcwebsite.playandroid.common.network.model.ApiResult
import top.mcwebsite.playandroid.common.network.model.PageModel
import top.mcwebsite.playandroid.common.network.model.RespModel

interface TixiApiService {
    @GET("/tree/json")
    suspend fun tixiTree(): ApiResult<RespModel<List<TixiModel>>>

    @GET("article/list/{page}/json")
    suspend fun articleList(
        @Path("page") page: Int,
        @Query("cid") cid: Long
    ): ApiResult<RespModel<PageModel<ArticleModel>>>
}